﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MODEL;
using Dapper;
using MySql.Data.MySqlClient;

namespace DAL
{
    public class TagInfoDAL
    {
        public static async Task<IEnumerable<TagObjectInfo>> QueryTagInfosAsync()
        {
            string sql = @"SELECT tagId
                    ,tagObjectName
                    ,tagObjectCode
                    ,mark 
                    FROM msap_db.tagobject_infor";

            using (MySqlConnection conn = new MySqlConnection(AppSetting.Instance.MySqlConnectionStr))
            {
                return await conn.QueryAsync<TagObjectInfo>(sql);
            }
        }
    }
}
